﻿<UserControl x:Class="RoutedWizard.RoutedWizardView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sh="http://schemas.shinywizard.codeplex.com/" 
    xmlns:local="clr-namespace:RoutedWizard" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <local:RoutedWizardViewModel x:Key="RoutedWizardViewModel"/>
        <local:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" DataContext="{StaticResource RoutedWizardViewModel}">
        <sh:WizardControl Title="Routed Wizard Example">
            <sh:WizardControl.Navigator>
                <sh:RoutedWizardNavigator>
                    <sh:WizardRoute StepName="WelcomeStep" TargetStepName="OptionsStep"/>
                    <sh:WizardRoute StepName="OptionsStep" TargetStepName="AdvancedOptionsStep" IsAvaliable="{Binding ShowAdvancedOptions}"/>
                    <sh:WizardRoute StepName="OptionsStep" TargetStepName="FinishStep" IsAvaliable="{Binding ShowAdvancedOptions, Converter={StaticResource InverseBooleanConverter}}"/>
                    <sh:WizardRoute StepName="AdvancedOptionsStep" TargetStepName="FinishStep"/>
                </sh:RoutedWizardNavigator>
            </sh:WizardControl.Navigator>
            <sh:WizardStep Name="WelcomeStep" Title="Welcome" Description="Welcome step">
                <Grid>
                    <TextBlock Text="Hello! Please follow the wizard steps."/>
                </Grid>
            </sh:WizardStep>
            <sh:WizardStep Name="OptionsStep" Title="Options" Description="Basic options">
                <Grid>
                    <CheckBox Content="Advanced options" IsChecked="{Binding ShowAdvancedOptions, Mode=TwoWay}" Margin="2,2,2,2"/>
                </Grid>
            </sh:WizardStep>
            <sh:WizardStep Name="AdvancedOptionsStep" Title="Advanced Options" Description="Advanced options">
                <Grid>
                    <CheckBox Content="Install Component A" Margin="2,2,2,2"/>
                    <CheckBox Content="Install Component B" Margin="2,26,2,2"/>
                </Grid>
            </sh:WizardStep>
            <sh:WizardStep Name="FinishStep" Title="Finish" Description="Well-done!">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Thank you! Bye.."/>
                    <!--<TextBlock Text="Install Component A:" Margin="2,26,2,2"/>
                    <TextBlock Text="Install Component B:" Margin="2,46,2,2"/>
                    <TextBlock Text="{Binding InstallComponentA, Mode=OneWay}" Grid.Column="1" Margin="2,26,2,2"/>
                    <TextBlock Text="{Binding InstallComponentB, Mode=OneWay}" Grid.Column="1"  Margin="2,46,2,2"/>-->
                </Grid>
            </sh:WizardStep>
        </sh:WizardControl>
    </Grid>
</UserControl>
